package mysgs.gameevent;

import mysgs.SGSMatchConfiguration;
import mysgs.cards.SGSCardInstance;
import mysgs.cards.SGSCardSuit;
import mysgs.role.RoleMap;
import mysgs.role.SGSJudge;
import mysgs.test.tmp;

public class SGSGameContext {
	private SGSMatchConfiguration gameOption;
	private SGSJudge judge;
	private RoleMap players;
	private PresentSkillMap skillMap;
	private RelationEventCache rec;
	private GameEventStack stack;
	private SGSCardInstance cardIns;
	private byte currentStage;
	public int round;
	public tmp tmp;
	private SGSCardSuit suit;
	
	public void setStage(byte stage) {
		currentStage = stage;
	}
	public byte getStage()
	{
		return currentStage;
	}
	
	public void setJudge(SGSJudge judge)
	{
		this.judge = judge;
	}
	
	public SGSJudge getJudge()
	{
		return judge;
	}
	
	public SGSGameContext(
		SGSMatchConfiguration gameOption,
		SGSJudge judge,
		RoleMap players,
		SGSCardInstance cardIns,
		SGSCardSuit suit, 
		tmp tmp
	)
	{
		this.gameOption = gameOption;
		this.judge = judge;
		this.players = players;
		this.cardIns = cardIns;
		this.suit = suit;
		this.tmp = tmp;
		skillMap = new PresentSkillMap(players);
		rec = new RelationEventCache();
		round = 0;
		stack = new GameEventStack();
		currentStage = GameLoop.StageNA;
	}
	/*
	public void reset(SGSMatchConfiguration gameOption, SGSJudge judge, RoleMap players)
	{
		this.gameOption = gameOption;
		this.judge = judge;
		this.players = players;
		skillMap.reset(players);
		round = 0;
		stack.reset();
		dctheap.reset();
		rec.clear();
	}*/
	
	public SGSMatchConfiguration getGameOption()
	{
		return gameOption;
	}
	
	public RoleMap getPlayers()
	{
		return players;
	}
	
	public PresentSkillMap getPresentSkillMap()
	{
		return skillMap;
	}
	public GameEventStack getStack()
	{
		return stack;
	}
	
	public void setRec(RelationEventCache rec) {
		this.rec = rec;
	}

	public RelationEventCache getRec() {
		return rec;
	}

	public SGSCardInstance getCardIns() {
		return cardIns;
	}
	public SGSCardSuit getCardSuit() {
		return suit;
	}
}
